package com.demo.test.state;

public class Demo {
    //当前时间时间
    private int currTime = 8;
    //1:未起床，2:起床了，3:吃完饭了。4:工作签到
    private int state = 1;
    public Demo(int cTime,int s){
        currTime = cTime;
        state = s;
    }

    public void main(){
        //当时间8点之前，还没有起床。那么就要迟到了。
        if(currTime <= 8 ){
            if(state == 1){
                System.out.println("哇！又迟到了");
            }else if(state == 2){
                System.out.println("来不及吃饭了，我要赶紧上班了");
            }else if(state == 3){
                System.out.println("睡好吃足，状态满满上班去");
            }else if(state == 4){
                System.out.println("上班那么早，生产队的驴都没你这么辛苦。");
            }else{
                System.out.println("未知状态，错误警告");
            }
        }else if(currTime == 9 ){
            if(state == 1){
                System.out.println("完蛋，今天要旷工了");
            }else if(state == 2){
                System.out.println("哇！来不及吃饭了，马上要迟到了");
            }else if(state == 3){
                System.out.println("抓紧抓紧，马上要迟到了");
            }else if(state == 4){
                System.out.println("coding。。。。请勿打扰");
            }
        }else{
            if(state == 4){
                System.out.println("ding。。。迟到打卡。奖励-100元。");
            }else{
                System.out.println("旷工旷工旷工！！！");
            }
        }
    }
}
